import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 获取租户列表
  getTenantList: (query) => api.get(`${config.interfaces.type5}portfolio-server/tenant/page-query`, query),
  // 获取机构详细信息
  queryInstitution: (query) => api.get(`${config.interfaces.type5}portfolio-server/institution/InstructionTree`, query),
  // 新增机构信息
  addInstitution: (query) => api.post(`${config.interfaces.type5}portfolio-server/institution/save`, query),
  // 根据Id编辑机构信息
  editInstitutionById: (query) => api.post(`${config.interfaces.type5}portfolio-server/institution/save`, query),
  // 删除机构信息
  deleteInstitutionById: (query) => api.post(`${config.interfaces.type5}portfolio-server/institution/delete/${query.id}`, {}),
  // 判断是否绑定用户接口
  getCheckbindById: (query) => api.get(`${config.interfaces.type5}portfolio-server/institution/checkbind/`, query),
  // 获取机构信息列表
  SearchCondition: (query) => api.get(`${config.interfaces.type5}portfolio-server/institution/condition`, query),
};
